/**
 * kernel.c
 *
 * Gerencia o kernel do SO
 *
 * Criado em 22-09-10
 */

#include <kernel.h>
#include <task.h>
#include <syscall.h>

// Inicia o sistema
inline void initializeSystem() {
	gdtInstall();
	idtInstall();
	isrsInstall();
	irqInstall();
	initializeVideo();

	timerInstall();

	keyboardInstall();

	__asm__ __volatile__ ("sti");
}

// Kernel do sistema operacional
void kmain() {

	onDebug();
	initializeSystem();
	//switch_to_user_mode();
	shell();

}
